package com.china08.yxyapi.entity.db.res;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import com.china08.yxyapi.entity.BaseEntityNoId;

/**
 * 课本表 添加数据时请手动生成id
 * 
 * @author Json
 *
 */
@Entity
@Table(name = "yxy_res_book", catalog = "yxy_res", uniqueConstraints = {
        @UniqueConstraint(columnNames = { "subjectId", "versionId", "semersterId", "phaseId" }) })
public class YxyResBook extends BaseEntityNoId {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(length = 32)
    private String id;

    // 科目
    @Column(length = 32, nullable = false)
    private String subjectId;

    @Column(length = 255, nullable = false)
    private String subjectName;

    // 版本
    @Column(length = 32, nullable = false)
    private String versionId;

    @Column(length = 255, nullable = false)
    private String versionName;

    // 学期
    @Column(length = 32, nullable = false)
    private String semersterId;

    @Column(length = 255, nullable = false)
    private String semersterName;

    // 学段
    @Column(length = 32, nullable = false)
    private String phaseId;

    @Column(length = 255, nullable = false)
    private String phaseName;
    // 状态信息0无效 1 有效
    @Column
    private Integer status = 1;

    /**
     * 
     */
    @Temporal(TemporalType.DATE)
    @Column(name = "publication_date")
    private Date pulbicationDate;

    /**
     * 教材封面
     */
    @Column(name = "cover", length = 100)
    private String cover;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getVersionId() {
        return versionId;
    }

    public void setVersionId(String versionId) {
        this.versionId = versionId;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getPhaseId() {
        return phaseId;
    }

    public void setPhaseId(String phaseId) {
        this.phaseId = phaseId;
    }

    public String getPhaseName() {
        return phaseName;
    }

    public void setPhaseName(String phaseName) {
        this.phaseName = phaseName;
    }

    public String getSemersterId() {
        return semersterId;
    }

    public void setSemersterId(String semersterId) {
        this.semersterId = semersterId;
    }

    public String getSemersterName() {
        return semersterName;
    }

    public void setSemersterName(String semersterName) {
        this.semersterName = semersterName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getPulbicationDate() {
        return pulbicationDate;
    }

    public void setPulbicationDate(Date pulbicationDate) {
        this.pulbicationDate = pulbicationDate;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

}
